//priority 10000
global.MobEffectEvent$Remove = function (/**@type Internal.MobEffectEvent */event) {
    MobEffectEvent.Listeners$Remove.forEach(Listener => {
        Listener(event)
    })
}
global.MobEffectEvent$Added = function (/**@type Internal.MobEffectEvent */event) {
    MobEffectEvent.Listeners$Added.forEach(Listener => {
        Listener(event)
    })
}
global.MobEffectEvent$Expired = function (/**@type Internal.MobEffectEvent */event) {
    MobEffectEvent.Listeners$Expired.forEach(Listener => {
        Listener(event)
    })
}
global.MobEffectEvent$Applicable = function (/**@type Internal.MobEffectEvent */event) {
    MobEffectEvent.Listeners$Applicable.forEach(Listener => {
        Listener(event)
    })
}
/**
 * @callback MobEffectEvent.Callback
 * @param {Internal.MobEffectEvent} event
 * @return {void}
*/
const MobEffectEvent = {
    Listeners$Remove: [],
    Listeners$Expired: [],
    Listeners$Added: [],
    Listeners$Applicable: [],

    addListener: function (/**@type {String}*/type,/**@type MobEffectEvent.Callback */callback) {
        if (type == "Remove") {
            this.Listeners$Remove.push(callback)
        }
        if (type == "Expired") {
            this.Listeners$Expired.push(callback)
        }
        if (type == "Added") {
            this.Listeners$Added.push(callback)
        }
        if (type == "Applicable") {
            this.Listeners$Applicable.push(callback)
        }
    },
    Remove: "Remove",
    Added: "Added",
    Expired: "Expired",
    Applicable: "Applicable"
}